package com.xxx.sso.async;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author caiwl
 * @date 2020/5/14 10:07
 */
@RestController
@RequestMapping("/async")
public class AsyncCtrl {
    @Autowired
    private AsyncService asyncService;

    @RequestMapping("/demo")
    public void demo() {
        asyncService.m1();
        asyncService.m2();
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + " ---------- i = " + i);
        }
    }
}
